 begintalkscript;

 variables;

		///***Miner***///

 begintalknode 1;
	state = 1;
	nextstate = 2;
	question = "Miner";
	text1 = "A scared miner is sitting in the storeroom. He looks hungry and exhausted. _GAH! Stay back! Don't hurt me!_";
	text2 = "A scared miner is hiding in the storeroom. He looks hungry and exhausted. _Have the lizards been killed?_ There is a hint of hopefulness in his voice.";
	text5 = "The miner seems relieved that you are still alive.";
	action = INTRO;
	code = if (species_in_party(3) == 0)
			remove_string(1);
		else
			remove_string(2);
 break;

 begintalknode 2;
	state = 2;
	nextstate = -1;
	condition = (species_in_party(3) > 0 && get_flag(5,1) == 0);
	question = "Calm down! We're on your side.";
	text1 = "It takes a while to convince him, but eventually you get through him.";
	action = SET_SDF 5 1 1;

 begintalknode 3;
	state = 2;
	nextstate = -1;
	condition = get_flag(2,8) == 2;
	question = "Are you by chance Falcon?";
	text1 = "The man seems surprised. _What? No, the last time I saw him he was mining near the guards quarters._";

 begintalknode 4;
	state = 2;
	nextstate = 3;
	condition = (species_in_party(3) == 0 || get_flag(5,1) == 1);
	question = "Tell me what happened here?";
	text1 = "_We were just mining, like usual._ The miner shudders. _Then suddenly, they just appeared outta nowhere and started killing us!_ He shakes his head. _It wasn't a long battle; the few guards were quickly killed._";
	text2 = "_Me mates and I retreated to our quarters and managed to hold 'em off for a day or so. Eventually they breached our defenses, and I hid._";

 begintalknode 5;
	state = 3;
	nextstate = -1;
	question = "What do you mean, 'they just appeared'?";
	text1 = "The miner shrugs. _Like I said, one minute they're not here, the other puf! A horde of bloodthirsty lizards are on yer back._";

 begintalknode 6;
	state = 2;
	nextstate = -1;
	condition = ((species_in_party(3) == 0 || get_flag(5,1) == 1) && get_flag(5,0) == 0);
	question = "Could you clear this blockade?";
	text1 = "_Sorry friends. I can barely find the strength ta stand up. The wall's a bit cracked, though. Maybe ye could smash it with a pick or something._";

 begintalknode 7;
	state = 2;
	nextstate = 7;
	condition = ((species_in_party(3) == 0 || get_flag(5,1) == 1) && get_flag(5,0) == 1);
	question = "We've cleared the way for you. You should leave.";
	text1 = "The miner manages a weak smile. _I'd love ta, but me legs can't hold me. It's been a while since I last ate. If I could have some bread or steak, then I could walk._";

 begintalknode 8;
	state = 7;
	nextstate = -1;
	condition = has_item(4) || has_item(8) || has_item(7);
	question = "Here have some food!";
	text1 = "The miner eagerly devours the food you give him, then you help him up. He starts to limp towards the door, but he quickly turns into a fast run.";
	action = END_TALK;
	code = award_party_xp(75,30);
	erase_char(9);
 break;

		///***Ossso***///

 begintalknode 10;
	state = -1;
	nextstate = 11;
	question = "Ossso";
	text1 = "The slith behind the anvil raises his hands as he sees you. _Pleasse humanss! Do not raisse your weaponss! I am on your sside!_ Whether this is true or not his accent is atrocious.";
	text5 = "Ossso nods at you.";
	action = INTRO;

 begintalknode 11;
	state = 11;
	nextstate = 12;
	question = "Maybe I won't kill you. Who are you?";
	text1 = "_I am Ossso from Gnass. You may not have heard of it, but it iss a slithzerikai town in Avernum. I wass ssent to sspy on thiss tribe of barbaric sslith._";

 begintalknode 12;
	state = 11;
	nextstate = -1;
	question = "You are a liar! Die scum! (Attack.)";
	text1 = "The slith grabs a spear and defends himself.";
	action = END_TALK;
	code = set_attitude(10,10);
 break;

 begintalknode 13;
	state = 12;
	nextstate = -1;
	question = "Why were you sent to spy on this tribe?";
	text1 = "_More and more tribess are getting interessted of the war between Avernum and the barbaric tribess. Thiss relatively ssmall tribe had yet been interessted, sso I wass sent to invesstigate._";

 begintalknode 14;
	state = 12;
	nextstate = 13;
	question = "What have you found out?";
	text1 = "_Thiss iss a tribe of warriorss. Which makess it even more ssurprissing, why they didn't attack Avernum sstraight ahead. Apparently they wanted to be ssure of their victory._";
	text2 = "_Alsso I'm ssure you've notissed that ssome of their warriorss are very ressisstant to pain._";
	text3 = "_Ssome time ago, the chief called out the order: thiss tribe would too join the barbaric tribess and fight Avernum. They were ready to march out, when ssomething sstrange happened._";
	text4 = "_There was a flassh of light, and large demons appeared in front of uss. They sspoke with the chief and before I could get away, we were teleported here, to fight humanss._";

 begintalknode 15;
	state = 13;
	nextstate = -1;
	question = "Tell me about the demons and what they said.";
	text1 = "_Their leader wass about thirteen feet tall. It looked like it could throw a mountain at you. I believe itss kind are called 'Haakai'. I wass too far away to hear what it ssaid, however._";
	code = inc_flag(5,2,1);
 break;

 begintalknode 16;
	state = 13;
	nextstate = -1;
	condition = get_flag(100,1) == 1;
	question = "Was the demon called Marnok?";
	text1 = "_I did not hear it ssay itss name, but no. Marnok iss itss lackey and thiss tribess contact to Marnok'ss masster._";

 begintalknode 17;
	state = 13;
	nextstate = -1;
	question = "Did you attack the miners?";
	text1 = "Ossso lowers his head. _I fought them, but sslew no-one. Not that it makess a differensse, the other slith were mosst efficient._";
	code = inc_flag(5,2,1);
 break;

 begintalknode 18;
	state = 13;
	nextstate = -1;
	condition = get_flag(5,2) == 2;
	question = "Why don't you join us and get out of here?";
	text1 = "Ossso grabs a spear. _I would be honored._";
	action = END_TALK;
	code = add_char_to_party(10);
		set_flag(5,2,5);
 break;